<div class="topurl">
        	<span class="left">
            	Bạn đang xem: <a href="<?php echo base_url();?>"><b>Trang chủ</b></a>  &raquo; <a href="<?php echo base_url().'tu-van-hoi-dap'?>" class="current">Tư vấn - Hỏi đáp</a>
            </span>
            <span class="right">
            	<span>Hỗ trợ bán hàng:</span>
            	<?php if(isset($support) && $support != null) {?>
                <?php foreach($support as $k => $v) {?> 
            		<a href="ymsgr:sendim?<?php echo $v->yahoo;?>" title="<?php echo $v->yahoo;?>">	                            	
                    	<img src="http://opi.yahoo.com/online?u=<?php echo $v->yahoo;?>&t=1" title="Chat với <?php echo $v->yahoo;?>" alt="Chat với <?php echo $v->yahoo;?>" />
                    </a> 
            	<?php }?>
            	<?php }?>
                <img src="<?php echo img_link('i-phone.gif');?>" title="" alt="" /> <span><b>043 824 3536</b> | <b>0979 899 100</b></span>
            </span>
        </div>
        <div class="main">
        	<div class="b-contact">
            	<div class="bg-formsubmit">
                	<div class="title-form">Form đặt hàng</div>
                    <ul class="form-item1">
                    	<?php
		                  $fullname = array(
		                    'name'    =>  'txtName',
		                    'style'   =>  'width:90%;',
		                    'value'   =>  set_value('txtName')
		                  );		     
		                  $address = array(
		                    'name'    =>  'txtAddress',
		                    'style'   =>  'width:90%;',
		                    'value'   =>  set_value('txtAddress')
		                  );             
		                  $email = array(
		                    'name'    =>  'txtEmail',
		                    'style'   =>  'width:90%;',
		                    'value'   =>  set_value('txtEmail')
		                  );
		                  $phone = array(
		                    'name'    =>  'txtPhone',
		                    'style'   =>  'width:60%;',
		                    'value'   =>  set_value('txtPhone')
		                  );    
		                  $code_products = array(
		                    'name'    =>  'txtCodeProducts',
		                    'style'   =>  'width:96%;',
		                    'value'   =>  set_value('txtCodeProducts')
		                  );         
		                  $content = array(
		                    'name'    =>  'txtContent',
		                    'rows'    =>  '3',
		                    'cols'    =>  '20',
		                    'style'   =>   'width:90%'
		                  );
		                  
		                  $i=0;
		                  if($this->message->get("success")){
		                    echo $this->message->display("success");
		                  }
		                  if($this->message->get('error')){
		                  	echo $this->message->display("error");
		                  }    
		                                   
		                  if(form_error($fullname['name']))
                          {       	                        		
                        	$fullname['style'] = 'border:solid 1px #ff0000; width:90%;';                        	
                  		  }
                  		  if(form_error($email['name']))
                          {       	                        		
                        	$email['style'] = 'border:solid 1px #ff0000; width:90%;';                        	
                  		  }
                  		  if(form_error($address['name']))
                          {       	                        		
                        	$address['style'] = 'border:solid 1px #ff0000; width:90%;';                        	
                  		  }
                  		  if(form_error($phone['name']))
                          {       	                        		
                        	$phone['style'] = 'border:solid 1px #ff0000; width:60%;';                        	
                  		  }
                  		  if(form_error($code_products['name']))
                          {       	                        		
                        	$code_products['style'] = 'border:solid 1px #ff0000; width:90%;';                        	
                  		  }
                  		  if(form_error($content['name']))
                          {       	                        		
                        	$content['style'] = 'border:solid 1px #ff0000; width:90%;';                        	
                  		  } 
                  		  
                  		  if(form_error($fullname['name']) || form_error($address['name']) || form_error($email['name']) || form_error($phone['name']) || form_error($code_products['name']) || form_error($content['name']))
                  		  {
                  		  	echo "<li class='error'><p>Có lỗi xảy ra! hãy kiểm tra lại các trường thông tin!</p></li>";
                  		  }
	                	?>
                		<?php echo form_open(base_url()."dat-hang-lien-he/dat-hang");?>
                    	<li>
                        	<span class="left">Họ tên <font color="#ed1b24">*</font></span>
                            <span class="right">
                            	<?php echo form_input($fullname);?>
                            </span>
                        </li>
                        <li>
                        	<span class="left">Địa chỉ</span>
                            <span class="right">
                            	<?php echo form_input($address);?>
                            </span>
                        </li>
                        <li>
                        	<span class="left">Số điện thoại <font color="#ed1b24">*</font></span>
                            <span class="right">
                            	<?php echo form_input($phone);?>
                            </span>
                        </li>
                        <li>
                        	<span class="left">Email <font color="#ed1b24">*</font></span>
                            <span class="right">
                            	<?php echo form_input($email);?>
                            </span>
                        </li>
                        <li>
                        	<span class="left">&nbsp;</span>
                            <span class="right"><input type="submit" name="" value="Đặt hàng" class="btnsend2" /></span>
                        </li>
                    </ul>
                    <ul class="form-item2">
                    	<?php		                 
		                  if($this->message->get("success")){
		                    echo $this->message->display("success");
		                  }
		                  if($this->message->get('error')){
		                  	echo $this->message->display("error");
		                  }    		                                   		                                   		  
                  		  if(form_error($fullname['name']) || form_error($address['name']) || form_error($email['name']) || form_error($phone['name']) || form_error($code_products['name']) || form_error($content['name']))
                  		  {
                  		  	echo "<li class='error'>&nbsp;</li>";
                  		  }
	                	?>
                    	<li>
                        	<span class="left">Mã sản phẩm đặt mua <font color="#ed1b24">*</font></span>
                            <span class="right">
                            	<?php if(isset($code_products_choice) && $code_products_choice != null) {?>
                            		<input type="text" name="txtCodeProducts" value="<?php echo $code_products_choice->code;?>" style="width:90%;" />
                            	<?php } else {?>
                            		<?php echo form_input($code_products);?>
                            	<?php }?>
                            </span>
                        </li>
                        <li>
                        	<span class="left">Thời gian dự kiến lắp đặt</span>
                            <span class="right">
                            	<select id="date_construction" name="date_construction">
                                	<option value="">Ngày</option>                                    
		                              <?php
							            for ($i = 1; $i <= 31; $i++)
							            {
							                $day_name = date('d', mktime(0, 0, 0, 1, $i, 2011));
							                echo '<option value="'.$day_name.'" set_select(date_construction, '.$day_name.', TRUE)>'.$day_name.'</option>';
							            }
									  ?>	
                                </select>
                                <select id="month_construction" name="month_construction">
                                	<option value="1">Tháng</option>
                                     <?php
							            for ($i = 1; $i <= 12; $i++)
							            {
							                $month_name = date('m', mktime(0, 0, 0, $i, 1, 2011));
							                echo '<option value="'.$month_name.'" set_select(month_construction, '.$month_name.', TRUE)>'.$month_name.'</option>';
							            }
									  ?>
                                </select>
                                <select  id="year_construction" name="year_construction">
                                	<option value="">Năm</option>
                                     <?php
							            for ($i = date('Y'); $i <= intval(date('Y')+19); $i++)
							            {								                
							                echo '<option value="'.$i.'" set_select(year_construction, '.$i.', TRUE)>'.$i.'</option>';
							            }
									  ?>
                                </select>
                            </span>
                        </li>
                        <li>
                        	<span class="left">Nội dung <font color="#ed1b24">*</font></span>
                            <span class="right">                            	
                            	<?php echo form_textarea($content,set_value($content['name']));?>
                            </span>
                        </li>
                        <?php echo form_close();?>
                    </ul>
                </div>
                <div class="bg-formlienhe">
                	<div class="title-form">Liên hệ với chúng tôi</div>
                    <ul class="form-item1">
                    	<?php
		                  $fullname_contacts = array(
		                    'name'    =>  'txtContactName',
		                    'style'   =>  'width:90%;',
		                    'value'   =>  set_value('txtContactName')
		                  );	
		                  $address_contacts = array(
		                    'name'    =>  'txtContactAddress',
		                    'style'   =>  'width:90%;',
		                    'value'   =>  set_value('txtContactAddress')
		                  );	                  
		                  $email_contacts = array(
		                    'name'    =>  'txtContactEmail',
		                    'style'   =>  'width:90%;',
		                    'value'   =>  set_value('txtContactEmail')
		                  );
		                  $phone_contacts = array(
		                    'name'    =>  'txtContactPhone',
		                    'style'   =>  'width:60%;',
		                    'value'   =>  set_value('txtContactPhone')
		                  );    		                       
		                  $content_contacts = array(
		                    'name'    =>  'txtContactContent',
		                    'rows'    =>  '4',
		                    'cols'    =>  '20',
		                    'style'   =>   'width:90%'
		                  );
		                  
		                  $i=0;
		                  if($this->message->get("success")){
		                    echo $this->message->display("success");
		                  }
		                  if($this->message->get('error')){
		                  	echo $this->message->display("error");
		                  }    
		                                   
		                  if(form_error($fullname_contacts['name']))
                          {       	                        		
                        	$fullname_contacts['style'] = 'border:solid 1px #ff0000; width:90%;';                        	
                  		  }
                  		  if(form_error($email_contacts['name']))
                          {       	                        		
                        	$email_contacts['style'] = 'border:solid 1px #ff0000; width:90%;';                        	
                  		  }
                  		  if(form_error($phone_contacts['name']))
                          {       	                        		
                        	$phone_contacts['style'] = 'border:solid 1px #ff0000; width:60%;';                        	
                  		  }
                  		  if(form_error($address_contacts['name']))
                          {       	                        		
                        	$address_contacts['style'] = 'border:solid 1px #ff0000; width:90%;';                        	
                  		  }
                  		  if(form_error($content_contacts['name']))
                          {       	                        		
                        	$content_contacts['style'] = 'border:solid 1px #ff0000; width:90%;';                        	
                  		  } 
                  		  
                  		  if(form_error($fullname_contacts['name']) || form_error($email_contacts['name']) || form_error($phone_contacts['name']) || form_error($address_contacts['name']) || form_error($content_contacts['name']))
                  		  {
                  		  	echo "<li class='error'><p>Có lỗi xảy ra! hãy kiểm tra lại các trường thông tin!</p></li>";
                  		  }
	                	?>
                		<?php echo form_open(base_url()."dat-hang-lien-he/lien-he");?>
                    	<li>
                        	<span class="left">Họ tên <font color="#ed1b24">*</font></span>
                            <span class="right">
                            	<?php echo form_input($fullname_contacts);?>
                            </span>
                        </li>
                        <li>
                        	<span class="left">Địa chỉ</span>
                            <span class="right">
                            	<?php echo form_input($address_contacts);?>
                            </span>
                        </li>
                        <li>
                        	<span class="left">Số điện thoại <font color="#ed1b24">*</font></span>
                            <span class="right">
                            	<?php echo form_input($phone_contacts);?>
                            </span>
                        </li>
                        <li>
                        	<span class="left">Email <font color="#ed1b24">*</font></span>
                            <span class="right">
                            	<?php echo form_input($email_contacts);?>
                            </span>
                        </li>
                        <li>
                        	<span class="left">&nbsp;</span>
                            <span class="right"><input type="submit" name="submit" value="Gửi chúng tôi" class="btnsend2" /></span>
                        </li>
                    </ul>
                    <ul class="form-item2">
                    	<?php		                 
		                  if($this->message->get("success")){
		                    echo $this->message->display("success");
		                  }
		                  if($this->message->get('error')){
		                  	echo $this->message->display("error");
		                  }
                  		  if(form_error($fullname_contacts['name']) || form_error($email_contacts['name']) || form_error($phone_contacts['name']) || form_error($address_contacts['name']) || form_error($content_contacts['name']))
                  		  {
                  		  	echo "<li class='error'>&nbsp;</li>";
                  		  }
	                	?>
                        <li>
                        	Nội dung<br />                        	
                        	<?php echo form_textarea($content_contacts,set_value($content_contacts['name']));?>
                        </li>
                    </ul>
                    <?php echo form_close();?>
                </div>
            </div>
        </div>